package com.mayuanfei.controller;

import com.mayuanfei.service.LocalRetryService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 本地重试方法测试
 *
 * @author 老马
 * @date 2025-04-07 11:19
 */
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping("/local")
public class LocalRetryController {

    private final LocalRetryService localRetryService;

    @RequestMapping("/retry")
    public void localRetry(String params) {
        localRetryService.localRetry(params);
    }

    @RequestMapping("/retry1")
    public void localRetry1(String params) {
        localRetryService.localRetryWithAnnotation(params);
    }

    @RequestMapping("/retryNoException")
    public void localNoException(String params) {
        localRetryService.localRetryNoException(params);
    }

    @RequestMapping("/retryMyMethod")
    public void localRetryMyMethod(String params) {
        localRetryService.localRetryMyMethod(params);
    }


    @RequestMapping("/retryIncludeException")
    public void localRetryIncludeException(String params) {
        localRetryService.localRetryIncludeException(params);
    }

    @RequestMapping("/retryExcludeException")
    public void localRetryExcludeException(String params) {
        localRetryService.localRetryExcludeException(params);
    }

    @RequestMapping("/retryPropagation")
    public void localRetryPropagation(String params) {
        localRetryService.localRetryPropagation(params);
    }

    @RequestMapping("/retryCompleteCallback")
    public void localRetryCompleteCallback(String params) {
        localRetryService.localRetryCompleteCallback(params);
    }
}